
// <copyright file="PropertyMetaData.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   The property meta data.
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Diagnostics.Performance
{
    /// <summary>
    /// The property meta data.
    /// </summary>
    public class PropertyMetaData
    {
        #region Constructors and Finalizers

        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyMetaData"/> class.
        /// </summary>
        /// <param name="propertyName">
        /// The property name.
        /// </param>
        /// <param name="groupName">
        /// The group name.
        /// </param>
        /// <param name="counterName">
        /// The counter name.
        /// </param>
        public PropertyMetaData(string propertyName, string groupName, string counterName)
            : this()
        {
            this.PropertyName = propertyName;
            this.GroupName = groupName;
            this.CounterName = counterName;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyMetaData"/> class.
        /// </summary>
        public PropertyMetaData()
        {
            this.IsValidForWindowsPerfCounter = true;
        }

        #endregion Constructors and Finalizers

        #region Public Properties

        /// <summary>
        /// Gets or sets the counter name.
        /// </summary>
        public string CounterName { get; set; }

        /// <summary>
        /// Gets or sets the group name.
        /// </summary>
        public string GroupName { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether is valid for windows perf counter.
        /// </summary>
        public bool IsValidForWindowsPerfCounter { get; set; }

        /// <summary>
        /// Gets or sets the property name.
        /// </summary>
        public string PropertyName { get; set; }

        #endregion Public Properties

        #region Public Methods and Operators

        /// <summary>
        /// The create new.
        /// </summary>
        /// <param name="propertyName">
        /// The property name.
        /// </param>
        /// <param name="groupName">
        /// The group name.
        /// </param>
        /// <param name="counterName">
        /// The counter name.
        /// </param>
        /// <returns>
        /// The <see cref="PropertyMetaData"/>.
        /// </returns>
        public static PropertyMetaData CreateNew(string propertyName, string groupName, string counterName)
        {
            return new PropertyMetaData(propertyName, groupName, counterName);
        }

        #endregion Public Methods and Operators
    }
}
